package com.kehutong.charge.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import com.kehutong.charge.util.enums.ChargeBillStatusEnum;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.coraframework.json.annotation.JSONField;
import org.coraframework.util.Objects;

import javax.validation.constraints.NotNull;

/**
 * @description: 抄表模板导出
 * @author: jian Ye
 * @create: 2021/8/23
 **/
@ExcelIgnoreUnannotated
@HeadRowHeight(50)
@HeadStyle(horizontalAlignment = HorizontalAlignment.LEFT)
@ContentFontStyle(fontHeightInPoints = 12)
@HeadFontStyle(fontHeightInPoints = 12,color = 10,bold = false)
public class InterimBillTemplateExcelVO {

    protected final static String BIG_TITLE =
            "填写须知（本行和表头行勿删除）：\n" +
            "(1)以下红字体为必填项，黑体字为选填；\n" +
            "(2)费用类型：该费用类型需与系统设置中的临时费用设置的类型保持一致；\n" +
            "(3)收费用户手机号码：仅支持国内11位手机号；\n" +
            "(4)备注为选填项，且字数限制为100字内；\n" +
            "(5)缴费状态：未缴费、已缴费、已退款、部分缴费、部分退款、已作废";



    @ColumnWidth(20)
    @ExcelProperty({BIG_TITLE,"项目/小区名称"})
    private String communityName;

    @ColumnWidth(10)
    @ExcelProperty({BIG_TITLE,"楼栋"})
    private String buildName;

    @ColumnWidth(10)
    @HeadFontStyle(fontHeightInPoints = 12,color = 8,bold = false)
    @ExcelProperty({BIG_TITLE,"单元"})
    private String unitName;

    @ColumnWidth(10)
    @ExcelProperty({BIG_TITLE,"房号"})
    private String houseNumber;

    @ColumnWidth(15)
    @ExcelProperty({BIG_TITLE,"费用类型"})
    private String feeTypeName;

    @ColumnWidth(15)
    @ExcelProperty({BIG_TITLE,"收费金额（元）"})
    private String billAmount;

    private ChargeBillStatusEnum billStatus;

    @ColumnWidth(15)
    @ExcelProperty({BIG_TITLE,"缴费状态"})
    private String billState;

    @ColumnWidth(20)
    @ExcelProperty({BIG_TITLE,"缴费人手机号"})
    private String mobile;

    @ColumnWidth(50)
    @HeadFontStyle(fontHeightInPoints = 12,color = 8,bold = false)
    @ExcelProperty({BIG_TITLE,"备注（选填）"})
    private String remarks;

    private String houseNo;



    public String getCommunityName() {
        return communityName;
    }

    public void setCommunityName(String communityName) {
        this.communityName = communityName;
    }

    public String getBuildName() {
        return buildName;
    }

    public void setBuildName(String buildName) {
        this.buildName = buildName;
    }

    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public String getHouseNumber() {
        return houseNumber;
    }

    public void setHouseNumber(String houseNumber) {
        this.houseNumber = houseNumber;
    }

    public String getFeeTypeName() {
        return feeTypeName;
    }

    public void setFeeTypeName(String feeTypeName) {
        this.feeTypeName = feeTypeName;
    }

    public String getBillAmount() {
        return billAmount;
    }

    public void setBillAmount(String billAmount) {
        this.billAmount = billAmount;
    }

    public ChargeBillStatusEnum getBillStatus() {
        return billStatus;
    }

    public void setBillStatus(ChargeBillStatusEnum billStatus) {
        this.billStatus = billStatus;
    }

    //特殊转换处理
    public String getBillState() {
        if(!Objects.isNull(billStatus)){
            return billStatus.getDesc();
        }
        return billState;
    }

    public void setBillState(String billState) {
        this.billState = billState;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getHouseNo() {
        return houseNo;
    }
    public void setHouseNo(String houseNo) {
        this.houseNo = houseNo;
    }
}
